FROM python:3.7

COPY . /var/www

RUN pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/\
    && pip config set install.trusted-host mirrors.aliyun.com\
    && pip install flask requests pymysql flask-cors uwsgi\
    && mkdir /var/uwsgi\
    && touch /var/uwsgi/uwsgi.log


EXPOSE 8000

CMD cd var/www\
    &&uwsgi uwsgi.ini\
    && tail -f /var/uwsgi/uwsgi.log